/**
 * @Description: test
 * @Author: Hu Outstanding
 * @Date: 2022/2/17 20:41
 */
package com.aaa.three.conver;

import com.aaa.three.pojo.domain.AdminEducation;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

public class AdminEducationConverter implements Converter<AdminEducation> {
    @Override
    public Class supportJavaTypeKey() {
        return AdminEducation.class;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return CellDataTypeEnum.STRING;
    }

    @Override
    public AdminEducation convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return null;
    }

    @Override
    public CellData convertToExcelData(AdminEducation adminEducation, ExcelContentProperty excelContentProperty,
                                       GlobalConfiguration globalConfiguration) throws Exception {
        return new CellData(adminEducation.getEducation());
    }
}
